﻿<%@ Language="C#" Inherits="System.Web.Mvc.ViewUserControl<FacialClub.Models.Entities.EmailTemplate>" %>

<%@ Import Namespace="FacialClub.Helpers" %>
<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript" />
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript" />
<script type="text/javascript">
    $(function () {
        $("#CreatedOn").datepicker({
            showOn: 'button',
            buttonImage: '/Content/Images/calendar.gif',
            buttonImageOnly: true
        });
    });
	</script>

<%: Html.ValidationSummaryJQuery("Please fix these errors.", new Dictionary<string, object> { { "id", "valSumId" } })%>
    <% Html.EnableClientValidation(); %>
<% using (Html.BeginForm()) {%>
<% ViewContext.FormContext.ValidationSummaryId = "valSumId"; %>
        <fieldset>
        <table width="100%" border="0" cellspacing="5" cellpadding="0">
            <tr>
                <td  style="width:150px;">
                    <strong>Template Name</strong></td>
                <td>
                    &nbsp;</td>
                <td>
                    <%: Html.TextBox("EmailTemplateName")%>
            <%: Html.ValidationMessage("EmailTemplateName","*")%></td>
            </tr>
            <tr>
                <td>
                  <strong>Description</strong></td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="3">
                    <%: Html.Editor("EmailTemplateDescription")%>
            <%: Html.ValidationMessage("EmailTemplateDescription","*")%></td>
            </tr>
            <tr>
                <td>
                    <strong>Is Visible</strong></td>
                <td>
                    &nbsp;</td>
                <td>
                     <%= Html.RadioButton("IsVisible", true, true)%> Yes <%= Html.RadioButton("IsVisible", false, false)%> No <br />
            <%: Html.ValidationMessage("IsVisible", "*")%></td>
            </tr>
            <tr>
                <td>
                    <strong>Created On</strong></td>
                <td>
                    &nbsp;</td>
                <td>
                   <%= Html.TextBox("CreatedOn", Model.CreatedOn)%>
            <%: Html.ValidationMessage("CreatedOn", "*")%></td>
            </tr>
            <tr>
                <td>
                    <input type="submit" value="Submit" /></td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
    </table>
        </fieldset>
<% } %>
